#!/usr/bin/env python 
# encoding: utf-8 
# @Author: Jacqueline
# @file: web0223.py
# @time: 2021/2/23 16:00
import time
from selenium.webdriver import Chrome
import pywinauto.key import send_key
def work1():

    driver = Chrome()
    driver.get("https://12306.com")

    res = driver.find_element_by_id("index_ads").location_once_scrolled_into_view
    print(res)

    time.sleep(2)

def upload_file(*args):
    '''元组数据类型'''
    time.sleep(2)
    for path in args:
        send_keys("文件路径")
    send_keys('{VK_RETURN}')

def work2():
    driver = Chrome()
    driver.get('')
    driver.find_element_by_id('test2').click()
    upload_file(("路径"))
    time.sleep(2)

work2()